<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<div class="content">
	<c:if test="${flag == 'category'}">
		<div class="notice">
				<p><span>文章分类:&nbsp;&nbsp;${theCategory.name }</span></p>
		</div>
	</c:if> 
	
	<c:forEach items="${postList}" var="post">
		<div class="post">
			
			<!-- 日期-标题 -->
			<div class="date"><span>${post.date.year }</span><span class="f">${post.date.zhMonth }${post.date.day }</span></div>
			<h2><a href="ShowSinglePost?id=${post.id }" rel="bookmark">${post.title }</a></h2>
			
			<!-- 信息 -->
			<div class="info">
				<span class="categories"><a href="ShowPostsByCategory?id=${post.category.id }" title="查看${post.category.name }的全部文章" rel="category">${post.category.name }</a></span>
       			<span class="tags">${post.tags }</span>
       			<c:if test="${user != null}"><!-- 如果用户已登录 -->
       				<a class="post-edit-link" href="AdminServlet?action=editPost&id=${post.id }" title="编辑文章">编辑</a>&raquo; 
       			</c:if>
				<span class="comments"><a href="ShowSinglePost?id=${post.id }" class="Comments off"  title="${post.title }上的评论"><em>${post.commentCount }</em> Comments</a></span>
			<div class="clear"></div>
			</div>
			
			<!-- 文章内容 -->
			<div class="intro">
				<p>${post.content}</p>
			</div>
			
		</div><!-- post-->
	</c:forEach>
</div>